package tvdi

class Curso {
	
	String nome
	Date dataInicio
	Date dataFim
	Date dateCreated
	Date lastUpdated
		
    static constraints = {
		nome(blank:false, nullable:false, unique:true)
		dataInicio(blank:false)
		dataFim(blank:false)
    }
	
	static hasMany = [modulos:Modulo]

	static mapping = {
		sort "dataInicio"
    }
	
	String toString(){
		return "${nome}"
	}
}
